package com.lenovo.lcdm.type.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lenovo.lcdm.type.dto.AttributeFolderDTO;
import com.lenovo.lcdm.type.entity.TypeAttributeFolder;

import java.util.List;

/**
* @author xujing30
* @description 针对表【type_attribute_folder】的数据库操作Service
* @createDate 2024-01-03 16:30:51
*/
public interface TypeAttributeFolderService extends IService<TypeAttributeFolder> {

    /**
     * 从Root文件夹开始查询
     * @return
     */
    AttributeFolderDTO queryRootFolder();

    /**
     * 查询Root子文件夹
     */
    List<TypeAttributeFolder> queryRootChild();

    /**
     * 查询所有folder及下的global attribute
     * @return
     */
    AttributeFolderDTO queryFolderAttribute();

    /**
     * 保存folder
     * @param name
     * @param parentId
     * @return
     */
    AttributeFolderDTO saveFolder(String name, Long parentId);

    /**
     * 更新folder
     * @param name
     * @param id
     */
    void updateFolder(String name, Long id);

    /**
     * 删除folder
     * @param id
     */
    void deleteFolder(Long id);

    /**
     * 根据属性文件夹名称查询
     */
    List<TypeAttributeFolder> queryByFolderName(String name);


}
